#pragma once
#pragma managed
#using <mscorlib.dll>
#include <Windows.h>
#include "OpenGL.h"
#include "ObjectClasses.h"
#include "Login.h"
#include "Form3.h"
#include "dbForm.h"
#include <stdlib.h>
#include "Variables.h"
#include <list>
#include <string>
using namespace System::Runtime::InteropServices;
//bool LoggedIn;
namespace OpenGL_on_a_Windows_Form {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace OpenGLForm;
	using namespace std;
	list<TempObject>* Mylist;
	


	/// <summary>
	/// Summary for Form1
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Login^ login;
		dbForm^ dbURLForm;
	private: System::Windows::Forms::Button^  button2;
	public: 
		Form3^ createAssignmentForm;
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
			login = gcnew Login();
			dbURLForm = gcnew dbForm();
			createAssignmentForm = gcnew Form3();
			//login->ShowDialog();
			
			
			OpenGL = gcnew COpenGL(this, 700, 680);
			Mylist = new list<TempObject>;

			//if(userName != "")
			//{
				
			//}
			
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
			delete Mylist; // Need to delete all the pointers here.
		}
	private: System::ComponentModel::IContainer^  components;
	protected: 
	private: System::Windows::Forms::Timer^  timer1;
	private: System::Windows::Forms::MenuStrip^  menuStrip1;
	private: System::Windows::Forms::ToolStripMenuItem^  fileToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  newSimulationToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  openSimulationToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  loginToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  assignmentsToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  settingsToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  databaseSettingsToolStripMenuItem;
	private: System::Windows::Forms::Panel^  ResultsPanel;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::RichTextBox^  richTextBox1;
	private: System::Windows::Forms::Panel^  AssignmentPanel;
	private: System::Windows::Forms::ComboBox^  AssignmentComboBox;


	private: System::Windows::Forms::Label^  AssignmentsLable;
	private: System::Windows::Forms::RichTextBox^  AssignmentTextBox;

	private: System::Windows::Forms::ToolStripMenuItem^  showAssignmentsToolStripMenuItem;
	private: System::Windows::Forms::TabControl^  SimulationTabs;
	private: System::Windows::Forms::TabPage^  BallTab;
	private: System::Windows::Forms::TabPage^  CollisionTab;
	private: System::Windows::Forms::Button^  BbalRunSimBtn;
	private: System::Windows::Forms::Button^  button1;
	private: System::Windows::Forms::ToolStripMenuItem^  submitSimulationToolStripMenuItem;
	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::Label^  label4;
	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown3;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown2;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown1;

	private: System::Windows::Forms::ToolStripMenuItem^  closeToolStripMenuItem;
	private: System::Windows::Forms::Label^  label12;
	private: System::Windows::Forms::Label^  label11;
	private: System::Windows::Forms::Label^  label10;
	private: System::Windows::Forms::Label^  label9;
	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown7;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown6;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown5;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown4;
	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::ToolStripMenuItem^  createAssignmentToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  helpToolStripMenuItem;



	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>

		OpenGLForm::COpenGL ^ OpenGL;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->components = (gcnew System::ComponentModel::Container());
			this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
			this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
			this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->newSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->openSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->loginToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->closeToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->assignmentsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->showAssignmentsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->submitSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->createAssignmentToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->settingsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->databaseSettingsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->ResultsPanel = (gcnew System::Windows::Forms::Panel());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
			this->AssignmentPanel = (gcnew System::Windows::Forms::Panel());
			this->AssignmentComboBox = (gcnew System::Windows::Forms::ComboBox());
			this->AssignmentsLable = (gcnew System::Windows::Forms::Label());
			this->AssignmentTextBox = (gcnew System::Windows::Forms::RichTextBox());
			this->SimulationTabs = (gcnew System::Windows::Forms::TabControl());
			this->BallTab = (gcnew System::Windows::Forms::TabPage());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->numericUpDown3 = (gcnew System::Windows::Forms::NumericUpDown());
			this->numericUpDown2 = (gcnew System::Windows::Forms::NumericUpDown());
			this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->BbalRunSimBtn = (gcnew System::Windows::Forms::Button());
			this->CollisionTab = (gcnew System::Windows::Forms::TabPage());
			this->label12 = (gcnew System::Windows::Forms::Label());
			this->label11 = (gcnew System::Windows::Forms::Label());
			this->label10 = (gcnew System::Windows::Forms::Label());
			this->label9 = (gcnew System::Windows::Forms::Label());
			this->label8 = (gcnew System::Windows::Forms::Label());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->numericUpDown7 = (gcnew System::Windows::Forms::NumericUpDown());
			this->numericUpDown6 = (gcnew System::Windows::Forms::NumericUpDown());
			this->numericUpDown5 = (gcnew System::Windows::Forms::NumericUpDown());
			this->numericUpDown4 = (gcnew System::Windows::Forms::NumericUpDown());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->button2 = (gcnew System::Windows::Forms::Button());
			this->menuStrip1->SuspendLayout();
			this->ResultsPanel->SuspendLayout();
			this->AssignmentPanel->SuspendLayout();
			this->SimulationTabs->SuspendLayout();
			this->BallTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown3))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown2))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
			this->CollisionTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown7))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown6))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown5))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown4))->BeginInit();
			this->SuspendLayout();
			// 
			// timer1
			// 
			this->timer1->Interval = 1;
			this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
			// 
			// menuStrip1
			// 
			this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(4) {this->fileToolStripMenuItem, 
				this->assignmentsToolStripMenuItem, this->settingsToolStripMenuItem, this->helpToolStripMenuItem});
			this->menuStrip1->Location = System::Drawing::Point(0, 0);
			this->menuStrip1->Name = L"menuStrip1";
			this->menuStrip1->Size = System::Drawing::Size(1264, 24);
			this->menuStrip1->TabIndex = 0;
			this->menuStrip1->Text = L"menuStrip1";
			// 
			// fileToolStripMenuItem
			// 
			this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(4) {this->newSimulationToolStripMenuItem, 
				this->openSimulationToolStripMenuItem, this->loginToolStripMenuItem, this->closeToolStripMenuItem});
			this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
			this->fileToolStripMenuItem->Size = System::Drawing::Size(37, 20);
			this->fileToolStripMenuItem->Text = L"File";
			// 
			// newSimulationToolStripMenuItem
			// 
			this->newSimulationToolStripMenuItem->Name = L"newSimulationToolStripMenuItem";
			this->newSimulationToolStripMenuItem->Size = System::Drawing::Size(163, 22);
			this->newSimulationToolStripMenuItem->Text = L"New Simulation";
			this->newSimulationToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::newSimulationToolStripMenuItem_Click);
			// 
			// openSimulationToolStripMenuItem
			// 
			this->openSimulationToolStripMenuItem->Name = L"openSimulationToolStripMenuItem";
			this->openSimulationToolStripMenuItem->Size = System::Drawing::Size(163, 22);
			this->openSimulationToolStripMenuItem->Text = L"Open Simulation";
			// 
			// loginToolStripMenuItem
			// 
			this->loginToolStripMenuItem->Name = L"loginToolStripMenuItem";
			this->loginToolStripMenuItem->Size = System::Drawing::Size(163, 22);
			this->loginToolStripMenuItem->Text = L"Login";
			this->loginToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::loginToolStripMenuItem_Click);
			// 
			// closeToolStripMenuItem
			// 
			this->closeToolStripMenuItem->Name = L"closeToolStripMenuItem";
			this->closeToolStripMenuItem->Size = System::Drawing::Size(163, 22);
			this->closeToolStripMenuItem->Text = L"Close";
			this->closeToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::closeToolStripMenuItem_Click);
			// 
			// assignmentsToolStripMenuItem
			// 
			this->assignmentsToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(3) {this->showAssignmentsToolStripMenuItem, 
				this->submitSimulationToolStripMenuItem, this->createAssignmentToolStripMenuItem});
			this->assignmentsToolStripMenuItem->Name = L"assignmentsToolStripMenuItem";
			this->assignmentsToolStripMenuItem->Size = System::Drawing::Size(87, 20);
			this->assignmentsToolStripMenuItem->Text = L"Assignments";
			this->assignmentsToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::assignmentsToolStripMenuItem_Click);
			// 
			// showAssignmentsToolStripMenuItem
			// 
			this->showAssignmentsToolStripMenuItem->Name = L"showAssignmentsToolStripMenuItem";
			this->showAssignmentsToolStripMenuItem->Size = System::Drawing::Size(178, 22);
			this->showAssignmentsToolStripMenuItem->Text = L"Show Assignments";
			this->showAssignmentsToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::showAssignmentsToolStripMenuItem_Click);
			// 
			// submitSimulationToolStripMenuItem
			// 
			this->submitSimulationToolStripMenuItem->Name = L"submitSimulationToolStripMenuItem";
			this->submitSimulationToolStripMenuItem->Size = System::Drawing::Size(178, 22);
			this->submitSimulationToolStripMenuItem->Text = L"Submit Assignment";
			// 
			// createAssignmentToolStripMenuItem
			// 
			this->createAssignmentToolStripMenuItem->Name = L"createAssignmentToolStripMenuItem";
			this->createAssignmentToolStripMenuItem->Size = System::Drawing::Size(178, 22);
			this->createAssignmentToolStripMenuItem->Text = L"Create Assignment";
			this->createAssignmentToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::createAssignmentToolStripMenuItem_Click);
			// 
			// settingsToolStripMenuItem
			// 
			this->settingsToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) {this->databaseSettingsToolStripMenuItem});
			this->settingsToolStripMenuItem->Name = L"settingsToolStripMenuItem";
			this->settingsToolStripMenuItem->Size = System::Drawing::Size(61, 20);
			this->settingsToolStripMenuItem->Text = L"Settings";
			// 
			// databaseSettingsToolStripMenuItem
			// 
			this->databaseSettingsToolStripMenuItem->Name = L"databaseSettingsToolStripMenuItem";
			this->databaseSettingsToolStripMenuItem->Size = System::Drawing::Size(167, 22);
			this->databaseSettingsToolStripMenuItem->Text = L"Database Settings";
			this->databaseSettingsToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::databaseSettingsToolStripMenuItem_Click);
			// 
			// helpToolStripMenuItem
			// 
			this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem";
			this->helpToolStripMenuItem->Size = System::Drawing::Size(44, 20);
			this->helpToolStripMenuItem->Text = L"Help";
			// 
			// ResultsPanel
			// 
			this->ResultsPanel->BackColor = System::Drawing::Color::LightBlue;
			this->ResultsPanel->Controls->Add(this->label1);
			this->ResultsPanel->Controls->Add(this->richTextBox1);
			this->ResultsPanel->Enabled = false;
			this->ResultsPanel->Location = System::Drawing::Point(723, 403);
			this->ResultsPanel->Name = L"ResultsPanel";
			this->ResultsPanel->Size = System::Drawing::Size(529, 312);
			this->ResultsPanel->TabIndex = 1;
			this->ResultsPanel->Visible = false;
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label1->Location = System::Drawing::Point(3, 10);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(237, 29);
			this->label1->TabIndex = 1;
			this->label1->Text = L"Simulation Results:";
			// 
			// richTextBox1
			// 
			this->richTextBox1->BackColor = System::Drawing::Color::LightBlue;
			this->richTextBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->richTextBox1->Location = System::Drawing::Point(3, 42);
			this->richTextBox1->Name = L"richTextBox1";
			this->richTextBox1->Size = System::Drawing::Size(523, 267);
			this->richTextBox1->TabIndex = 0;
			this->richTextBox1->Text = L"Results For Simulations Are Listed Below Simulation Results Label";
			// 
			// AssignmentPanel
			// 
			this->AssignmentPanel->BackColor = System::Drawing::Color::LightBlue;
			this->AssignmentPanel->Controls->Add(this->AssignmentComboBox);
			this->AssignmentPanel->Controls->Add(this->AssignmentsLable);
			this->AssignmentPanel->Controls->Add(this->AssignmentTextBox);
			this->AssignmentPanel->Enabled = false;
			this->AssignmentPanel->Location = System::Drawing::Point(719, 406);
			this->AssignmentPanel->Name = L"AssignmentPanel";
			this->AssignmentPanel->Size = System::Drawing::Size(529, 312);
			this->AssignmentPanel->TabIndex = 2;
			this->AssignmentPanel->Visible = false;
			// 
			// AssignmentComboBox
			// 
			this->AssignmentComboBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->AssignmentComboBox->FormattingEnabled = true;
			this->AssignmentComboBox->Location = System::Drawing::Point(211, 16);
			this->AssignmentComboBox->Name = L"AssignmentComboBox";
			this->AssignmentComboBox->Size = System::Drawing::Size(315, 37);
			this->AssignmentComboBox->TabIndex = 2;
			this->AssignmentComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::AssignmentComboBox_SelectedIndexChanged);
			// 
			// AssignmentsLable
			// 
			this->AssignmentsLable->AutoSize = true;
			this->AssignmentsLable->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->AssignmentsLable->Location = System::Drawing::Point(3, 19);
			this->AssignmentsLable->Name = L"AssignmentsLable";
			this->AssignmentsLable->Size = System::Drawing::Size(198, 31);
			this->AssignmentsLable->TabIndex = 1;
			this->AssignmentsLable->Text = L"Assignments: ";
			// 
			// AssignmentTextBox
			// 
			this->AssignmentTextBox->Enabled = false;
			this->AssignmentTextBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->AssignmentTextBox->Location = System::Drawing::Point(6, 59);
			this->AssignmentTextBox->Name = L"AssignmentTextBox";
			this->AssignmentTextBox->Size = System::Drawing::Size(523, 247);
			this->AssignmentTextBox->TabIndex = 0;
			this->AssignmentTextBox->Text = L"Description of Selected Assignment Goes here...";
			// 
			// SimulationTabs
			// 
			this->SimulationTabs->Appearance = System::Windows::Forms::TabAppearance::Buttons;
			this->SimulationTabs->Controls->Add(this->BallTab);
			this->SimulationTabs->Controls->Add(this->CollisionTab);
			this->SimulationTabs->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SimulationTabs->Location = System::Drawing::Point(720, 27);
			this->SimulationTabs->Name = L"SimulationTabs";
			this->SimulationTabs->SelectedIndex = 0;
			this->SimulationTabs->Size = System::Drawing::Size(532, 370);
			this->SimulationTabs->TabIndex = 3;
			// 
			// BallTab
			// 
			this->BallTab->BackColor = System::Drawing::Color::LightBlue;
			this->BallTab->Controls->Add(this->button2);
			this->BallTab->Controls->Add(this->label5);
			this->BallTab->Controls->Add(this->label4);
			this->BallTab->Controls->Add(this->label3);
			this->BallTab->Controls->Add(this->label2);
			this->BallTab->Controls->Add(this->numericUpDown3);
			this->BallTab->Controls->Add(this->numericUpDown2);
			this->BallTab->Controls->Add(this->numericUpDown1);
			this->BallTab->Controls->Add(this->BbalRunSimBtn);
			this->BallTab->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->BallTab->Location = System::Drawing::Point(4, 27);
			this->BallTab->Name = L"BallTab";
			this->BallTab->Padding = System::Windows::Forms::Padding(3);
			this->BallTab->Size = System::Drawing::Size(524, 339);
			this->BallTab->TabIndex = 0;
			this->BallTab->Text = L"Bouncing Ball";
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label5->Location = System::Drawing::Point(126, 135);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(140, 29);
			this->label5->TabIndex = 7;
			this->label5->Text = L"Ball Mass: ";
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label4->Location = System::Drawing::Point(102, 100);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(153, 29);
			this->label4->TabIndex = 6;
			this->label4->Text = L"Ball Radius:";
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label3->Location = System::Drawing::Point(113, 53);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(155, 29);
			this->label3->TabIndex = 5;
			this->label3->Text = L"Ball Height: ";
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 21.75F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label2->Location = System::Drawing::Point(75, 3);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(371, 33);
			this->label2->TabIndex = 4;
			this->label2->Text = L"Bouncing Ball Simulation ";
			// 
			// numericUpDown3
			// 
			this->numericUpDown3->DecimalPlaces = 3;
			this->numericUpDown3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->numericUpDown3->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->numericUpDown3->Location = System::Drawing::Point(274, 135);
			this->numericUpDown3->Name = L"numericUpDown3";
			this->numericUpDown3->Size = System::Drawing::Size(120, 35);
			this->numericUpDown3->TabIndex = 3;
			// 
			// numericUpDown2
			// 
			this->numericUpDown2->DecimalPlaces = 3;
			this->numericUpDown2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->numericUpDown2->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->numericUpDown2->Location = System::Drawing::Point(274, 94);
			this->numericUpDown2->Name = L"numericUpDown2";
			this->numericUpDown2->Size = System::Drawing::Size(120, 35);
			this->numericUpDown2->TabIndex = 2;
			// 
			// numericUpDown1
			// 
			this->numericUpDown1->DecimalPlaces = 3;
			this->numericUpDown1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->numericUpDown1->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->numericUpDown1->Location = System::Drawing::Point(274, 53);
			this->numericUpDown1->Name = L"numericUpDown1";
			this->numericUpDown1->Size = System::Drawing::Size(120, 35);
			this->numericUpDown1->TabIndex = 1;
			// 
			// BbalRunSimBtn
			// 
			this->BbalRunSimBtn->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->BbalRunSimBtn->Location = System::Drawing::Point(72, 176);
			this->BbalRunSimBtn->Name = L"BbalRunSimBtn";
			this->BbalRunSimBtn->Size = System::Drawing::Size(384, 63);
			this->BbalRunSimBtn->TabIndex = 0;
			this->BbalRunSimBtn->Text = L"Run Simulation";
			this->BbalRunSimBtn->UseVisualStyleBackColor = true;
			this->BbalRunSimBtn->Click += gcnew System::EventHandler(this, &Form1::BbalRunSimBtn_Click);
			// 
			// CollisionTab
			// 
			this->CollisionTab->BackColor = System::Drawing::Color::LightBlue;
			this->CollisionTab->Controls->Add(this->label12);
			this->CollisionTab->Controls->Add(this->label11);
			this->CollisionTab->Controls->Add(this->label10);
			this->CollisionTab->Controls->Add(this->label9);
			this->CollisionTab->Controls->Add(this->label8);
			this->CollisionTab->Controls->Add(this->label7);
			this->CollisionTab->Controls->Add(this->numericUpDown7);
			this->CollisionTab->Controls->Add(this->numericUpDown6);
			this->CollisionTab->Controls->Add(this->numericUpDown5);
			this->CollisionTab->Controls->Add(this->numericUpDown4);
			this->CollisionTab->Controls->Add(this->label6);
			this->CollisionTab->Controls->Add(this->button1);
			this->CollisionTab->Location = System::Drawing::Point(4, 27);
			this->CollisionTab->Name = L"CollisionTab";
			this->CollisionTab->Padding = System::Windows::Forms::Padding(3);
			this->CollisionTab->Size = System::Drawing::Size(524, 339);
			this->CollisionTab->TabIndex = 1;
			this->CollisionTab->Text = L"Two Point Collisions";
			// 
			// label12
			// 
			this->label12->AutoSize = true;
			this->label12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 21.75F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label12->Location = System::Drawing::Point(320, 62);
			this->label12->Name = L"label12";
			this->label12->Size = System::Drawing::Size(171, 33);
			this->label12->TabIndex = 15;
			this->label12->Text = L"Right Mass";
			// 
			// label11
			// 
			this->label11->AutoSize = true;
			this->label11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 21.75F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label11->Location = System::Drawing::Point(89, 62);
			this->label11->Name = L"label11";
			this->label11->Size = System::Drawing::Size(150, 33);
			this->label11->TabIndex = 14;
			this->label11->Text = L"Left Mass";
			// 
			// label10
			// 
			this->label10->AutoSize = true;
			this->label10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label10->Location = System::Drawing::Point(3, 182);
			this->label10->Name = L"label10";
			this->label10->Size = System::Drawing::Size(127, 31);
			this->label10->TabIndex = 13;
			this->label10->Text = L"Velocity:";
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label9->Location = System::Drawing::Point(265, 186);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(127, 31);
			this->label9->TabIndex = 12;
			this->label9->Text = L"Velocity:";
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label8->Location = System::Drawing::Point(300, 121);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(92, 31);
			this->label8->TabIndex = 11;
			this->label8->Text = L"Mass:";
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label7->Location = System::Drawing::Point(38, 116);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(92, 31);
			this->label7->TabIndex = 10;
			this->label7->Text = L"Mass:";
			// 
			// numericUpDown7
			// 
			this->numericUpDown7->DecimalPlaces = 3;
			this->numericUpDown7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->numericUpDown7->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->numericUpDown7->Location = System::Drawing::Point(398, 182);
			this->numericUpDown7->Name = L"numericUpDown7";
			this->numericUpDown7->Size = System::Drawing::Size(120, 35);
			this->numericUpDown7->TabIndex = 9;
			// 
			// numericUpDown6
			// 
			this->numericUpDown6->DecimalPlaces = 3;
			this->numericUpDown6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->numericUpDown6->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->numericUpDown6->Location = System::Drawing::Point(131, 182);
			this->numericUpDown6->Name = L"numericUpDown6";
			this->numericUpDown6->Size = System::Drawing::Size(120, 35);
			this->numericUpDown6->TabIndex = 8;
			// 
			// numericUpDown5
			// 
			this->numericUpDown5->DecimalPlaces = 3;
			this->numericUpDown5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->numericUpDown5->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->numericUpDown5->Location = System::Drawing::Point(398, 117);
			this->numericUpDown5->Name = L"numericUpDown5";
			this->numericUpDown5->Size = System::Drawing::Size(120, 35);
			this->numericUpDown5->TabIndex = 7;
			// 
			// numericUpDown4
			// 
			this->numericUpDown4->DecimalPlaces = 3;
			this->numericUpDown4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->numericUpDown4->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->numericUpDown4->Location = System::Drawing::Point(131, 117);
			this->numericUpDown4->Name = L"numericUpDown4";
			this->numericUpDown4->Size = System::Drawing::Size(120, 35);
			this->numericUpDown4->TabIndex = 6;
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 21.75F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label6->Location = System::Drawing::Point(66, 3);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(403, 33);
			this->label6->TabIndex = 5;
			this->label6->Text = L"Two Point-Mass Simulation ";
			// 
			// button1
			// 
			this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button1->Location = System::Drawing::Point(72, 272);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(384, 63);
			this->button1->TabIndex = 1;
			this->button1->Text = L"Run Simulation";
			this->button1->UseVisualStyleBackColor = true;
			// 
			// button2
			// 
			this->button2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button2->Location = System::Drawing::Point(72, 254);
			this->button2->Name = L"button2";
			this->button2->Size = System::Drawing::Size(384, 63);
			this->button2->TabIndex = 8;
			this->button2->Text = L"Pause Simulation";
			this->button2->UseVisualStyleBackColor = true;
			this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->AutoSize = true;
			this->BackColor = System::Drawing::Color::LightBlue;
			this->ClientSize = System::Drawing::Size(1264, 727);
			this->Controls->Add(this->SimulationTabs);
			this->Controls->Add(this->AssignmentPanel);
			this->Controls->Add(this->ResultsPanel);
			this->Controls->Add(this->menuStrip1);
			this->MainMenuStrip = this->menuStrip1;
			this->Name = L"Form1";
			this->Text = L"Physics Simulator";
			this->menuStrip1->ResumeLayout(false);
			this->menuStrip1->PerformLayout();
			this->ResultsPanel->ResumeLayout(false);
			this->ResultsPanel->PerformLayout();
			this->AssignmentPanel->ResumeLayout(false);
			this->AssignmentPanel->PerformLayout();
			this->SimulationTabs->ResumeLayout(false);
			this->BallTab->ResumeLayout(false);
			this->BallTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown3))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown2))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
			this->CollisionTab->ResumeLayout(false);
			this->CollisionTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown7))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown6))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown5))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown4))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e)
			 {
				 UNREFERENCED_PARAMETER(sender);
				 UNREFERENCED_PARAMETER(e);
				 OpenGL->Render();
				 OpenGL->SwapOpenGLBuffers();
			 }
	private: System::Void newSimulationToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 AssignmentPanel->Enabled=false;
				 AssignmentPanel->Visible=false;
			 }
private: System::Void showAssignmentsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 ResultsPanel->Enabled=false;
			 ResultsPanel->Visible=false;
			 AssignmentPanel->Enabled=true;
			 AssignmentPanel->Visible=true;

			 list<string> Mylist;
			 Mylist.push_front("Assignment 1");
			 


		 }
private: System::Void BbalRunSimBtn_Click(System::Object^  sender, System::EventArgs^  e) {
			
			 AssignmentPanel->Enabled=false;
			 AssignmentPanel->Visible=false;
			 ResultsPanel->Enabled = true;
			 ResultsPanel->Visible = true;
			 timer1->Enabled = true;
		 }
private: System::Void assignmentsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void AssignmentComboBox_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) 
		 {
			; 
			//Clicked on a combobox text.. now need to find the proper assignment and display its contests.
			// Converting managed to unmanaged to search Mylist...
			 string SelectedText = "Test";
			 String^ SelectedItem = AssignmentComboBox->Text;
			 MarshalString(SelectedItem, SelectedText);
			 //Search List For Given assignment.
			 String^ sm = gcnew String(SelectedText.c_str());
			 AssignmentTextBox->Text = sm;
			

			 for(list<TempObject>::iterator iterator = Mylist->begin(); iterator != Mylist->end(); ++iterator)
			{
				if(iterator->getName() == SelectedText)
				{
					string Descr = iterator->getDescription();
					String^ TempDesc = gcnew String(Descr.c_str());
					AssignmentTextBox->Text = TempDesc;		
				}
			}
		 }


private: System::Void closeToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->Close();
		 }
private: System::Void loginToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 //Display The Login Window...
			 // try
			  //{
				//  while(true)
				//  {
				//	if(LoggedIn == true)
				//		break;
					login->ShowDialog();
				//	String^ uNameTest = login->getName();
				//	String^ uPassword = login->getPassword();
				//	string TempuName = "Test";
				//	string TempPassword = "Test";
				//	MarshalString(uNameTest, TempuName);
				//	MarshalString(uPassword, TempPassword);
				//	if(TempuName == "Natey12" && TempPassword == "Password")
				//	{
				//		MessageBox::Show("You Have Been Successfully Logged In");
						
				//		break;
				//	}
				//	else
				//	{
				//		bool cLogin = login->cl;
				//		if(cLogin == true)
				//		{
							
				//			break;
				//		}
				//		MessageBox::Show("Not Successfully Logged In...\nPlease Try Again..");
				//	}
				 // }

			  //}
			  //catch(...)
			  //{
			//	  MessageBox::Show("Error Loggin On");
			 // }
			  //if(LoggedIn == false && login->cl !=true)
			  //{
					Mylist->push_back(TempObject("Assignment 1", "Create a BOUNCING BALL simulation where the Mass of the ball is \"10 kg\" the Height is \"76\" Feet, and the Radious is \"3\" Feet."));
					Mylist->push_back(TempObject("Assignment 2", "Assignment 2's description will go here..."));
					Mylist->push_back(TempObject("Assignment 3","Assignment 3 Is A Hard ASSIGNMENT!"));
					Mylist->push_back(TempObject("Assignment 4","No Description Here..."));
					Mylist->push_back(TempObject("Assignment 5","Assignment 5 is The Last Assignment."));
					//In order to get the string into the text boxes we need to convert them to c_strings
					//Then put thatn into the String^ sm = gcnew String(x.c_str()) for it to work. (Unamanged to managed).
			
		
					for(list<TempObject>::iterator iterator = Mylist->begin(); iterator != Mylist->end(); ++iterator)
					{
						string temp = iterator->getName();
						String^ sm = gcnew String(temp.c_str());
						AssignmentComboBox->Items->Add(sm);
					}
				//	LoggedIn = true;
				//	login->setCancelLogin(false);
			//	} // end of if logged in.
			  //else
			  //{
			//	  if(login->cl ==false)
			//		MessageBox::Show("Already Logged In");
			//	  else
			//		  login->setCancelLogin(false);
			//  }
		 }
private: System::Void databaseSettingsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {

			dbURLForm->ShowDialog();
		 }
private: System::Void createAssignmentToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 createAssignmentForm->ShowDialog();
		 }
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
			 timer1->Enabled=false;
		 }
};
}

